// IMPORT


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*IMPORT][IMPORT:1]]
import * as Test from "./test.module.js"
// IMPORT:1 ends here
// MODULES


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*MODULES][MODULES:1]]
function report(){
    Test.report(evals(testObjects))
}

function evals(objects){
    objects.forEach(function(object){
        object.is=eval(object.form)
    })
    return objects
}
// MODULES:1 ends here
// DATABASE


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*DATABASE][DATABASE:1]]
let testObjects=[]
// DATABASE:1 ends here
// test.module.js

// 测试能否正常输出信息


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*test.module.js][test.module.js:1]]
testObjects.push(
    {form:"Test.report([{form:'1',is:1,shouldbe:1}])",shouldbe:undefined,jsfile:"test.module.js",document:"测试report函数"}
)
// test.module.js:1 ends here
// tests.module.js

// 本文件自身的测试

// 是的，它可以自己测试自己是否正常使用。


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*tests.module.js][tests.module.js:1]]
testObjects.push(
    {form:"evals([{form:'1',shouldbe:1}])",shouldbe:[{form:"1",is:1,shouldbe:1}],jsfile:"tests.module.js",document:"测试evals函数"}
)
// tests.module.js:1 ends here
// attackPower.module.js

// 测试攻击力计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*attackPower.module.js][attackPower.module.js:1]]
testObjects.push(
    {form:"AttackPower.calculate(attackProperties)",shouldbe:669,jsfile:"attackPower.module.js",document:"测试calculate函数计算攻击力"}
)

import * as AttackPower from "./attackPower.module.js"

let attackProperties={
    /* 武器攻击力 */
    武器基础攻击力:496,
    武器精铸攻击力:53,
    武器重铸攻击力:0,
    血灵石攻击力增幅:0,

    /* 其他攻击力 */
    项链攻击力:0,
    羁绊攻击力:25,
    好感度攻击力:25,
    基础攻击力:10,
    兽潮攻击力:0,
    专精攻击力:60,

    /* 百分比攻击增幅 */
    出战魂:0,
    强攻:0,
    兽潮百分比攻击增幅:0,
    料理:0,
    魂萃:0,
    技能:0
}
// attackPower.module.js:1 ends here
// elementalAttackPower.module.js

// 测试元素攻击力计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*elementalAttackPower.module.js][elementalAttackPower.module.js:1]]
testObjects.push(
    {form:"Math.round(ElementalAttackPower.calculate(elementalAttackProperties))",shouldbe:947,jsfile:"elementalAttackPower.module.js",document:"测试用＂calculate＂计算元素攻击力"}
)

import * as ElementalAttackPower from "./elementalAttackPower.module.js"

let elementalAttackProperties={
    /* 武器元素攻击力 */
    武器基础元素攻击力:448,
    武器精铸元素攻击力:35,
    武器重铸元素攻击力:78,
    血灵石元素攻击力增幅:0.35,

    /* 其他元素攻击力 */
    项链元素攻击力:79,
    兽潮元素攻击力:0,

    /* 魂萃元素攻击力增幅 */
    魂萃元素攻击力增幅:0.132,
}
// elementalAttackPower.module.js:1 ends here
// critRate.module.js

// 测试暴击率计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*critRate.module.js][critRate.module.js:1]]
testObjects.push(
    {form:"CritRate.calculate(critRateProperties)",shouldbe:0.512,jsfile:"critRate.module.js",document:"测试＂calculate＂计算暴击率"}
)

import * as CritRate from "./critRate.module.js"

let critRateProperties={
    /* 面板系 */
    武器基础暴击率:0.22,
    武器精铸暴击率:0.05,
    武器重铸暴击率:0.03,
    血灵石暴击率:0,
    精准:0.06,
    锐利:0,
    伙伴羁绊:0.025,
    项链:0.017,
    基础暴击率:0.05,
    料理:0,

    /* 非面板系 */
    荷尔蒙:0.06,
    断食:0,
    战意:0,
    诡诈:0,
    心得:0,
    伙伴出战:0,
    出战魂:0,
    技能符文:0,
    专精增幅:0
}
// critRate.module.js:1 ends here
// critDamageRate.module.js

// 测试暴击伤害倍率计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*critDamageRate.module.js][critDamageRate.module.js:1]]
testObjects.push(
    {form:"parseFloat(CritDamageRate.calculate(critDamageRateProperties).toFixed(3))",shouldbe:1.485,jsfile:"critDamageRate.module.js",document:"测试＂calculate＂计算暴击伤害倍率"}
)

import * as CritDamageRate from "./critDamageRate.module.js"

let critDamageRateProperties={
    /* 面板系 */
    武器基础爆伤:0,
    武器精铸爆伤:0,
    武器重铸爆伤:0.1,
    血灵石爆伤:0,
    重创:0.12,
    伙伴羁绊:0.025,
    项链:0,
    基础爆伤:0.35,
    满专精爆伤:0.48,
    通用魂萃爆伤:0,
    料理:0,
    兽潮爆伤:0,

    /* 非面板系 */
    破势:0.13,
    浴血:0.1,
    断食:0,
    战意:0,
    盾刺:0.12,
    平原猎术:0.06,
    雪山猎术:0,
    沙漠猎术:0,
    狂热:0,
    出战魂:0,
    伙伴出战:0,
    专精技能:0,
    符文技能:0
}
// critDamageRate.module.js:1 ends here
// penetration.module.js

// 测试无视护甲时巨兽所受到的实际伤害的计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*penetration.module.js][penetration.module.js:1]]
testObjects.push(
    {form:"parseFloat(Penetration.calculate(penetrationProperties).toFixed(4))",shouldbe:0.7205,jsfile:"penetration.module.js",document:"测试＂calculate＂计算无视护甲时巨兽受到的实际伤害"}
)

import * as Penetration from "./penetration.module.js"

let  penetrationProperties={
    巨兽护甲星级:2,

    /* 本身护甲穿透 */
    穿透:0,
    进退:0,
    燃血:0,
    出战魂:0,
    魂萃:0,
    羁绊:0.03
}
// penetration.module.js:1 ends here
// resistance.module.js

// 测试无视抗性时巨兽所受到的实际伤害的计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*resistance.module.js][resistance.module.js:1]]
testObjects.push(
    {form:"parseFloat(Resistance.calculate(resistanceProperties).toFixed(4))",shouldbe:0.5405,jsfile:"resistance.module.js",document:"测试＂calculate＂计算无视抗性时巨兽受到的实际伤害"}
)

import * as Resistance from "./resistance.module.js"

let  resistanceProperties={
    巨兽抗性星级:1,

    实际无视抗性比例:0
}
// resistance.module.js:1 ends here
// elementalStarDamageFactor.module.js

// 测试元素星级伤害系数的计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*elementalStarDamageFactor.module.js][elementalStarDamageFactor.module.js:1]]
testObjects.push(
    {form:"ElementalStarDamageFactor.calculate(elementalStar)",shouldbe:2,jsfile:"elementalStarDamageFactor.module.js",document:"测试＂calculate＂计算元素星级伤害系数"}
)

import * as ElementalStarDamageFactor from "./elementalStarDamageFactor.module.js"

let  elementalStar=3
// elementalStarDamageFactor.module.js:1 ends here
// nonSpiritualElementDamageBonus.module.js

// 测试非魂技元素伤害加成的计算，不包括使用魂技带来的元素伤害加成


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*nonSpiritualElementDamageBonus.module.js][nonSpiritualElementDamageBonus.module.js:1]]
testObjects.push(
    {form:"NonSpiritualElementDamageBonus.calculate(nonSpiritualElementDamageProperties)",shouldbe:0.525,jsfile:"nonSpiritualElementDamageBonus.module.js",document:"测试＂calculate＂非魂技元素伤害加成"}
)

import * as NonSpiritualElementDamageBonus from "./nonSpiritualElementDamageBonus.module.js"

let  nonSpiritualElementDamageProperties={
    元素专精:0.5,
    进退:0,
    燃血:0,
    兽潮:0,
    料理:0,
    羁绊:0.025
}
// nonSpiritualElementDamageBonus.module.js:1 ends here
// spiritualElementDamageBonus

// 魂技元素伤害加成


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*spiritualElementDamageBonus][spiritualElementDamageBonus:1]]
let spiritualElementDamageBonus=0
// spiritualElementDamageBonus:1 ends here
// vulnerabilityCoefficient

// 易伤系数


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*vulnerabilityCoefficient][vulnerabilityCoefficient:1]]
let vulnerabilityCoefficient=0
// vulnerabilityCoefficient:1 ends here
// transferCoefficient

// 传递系数


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*transferCoefficient][transferCoefficient:1]]
let transferCoefficient=0
// transferCoefficient:1 ends here
// limbAttackDamage.module.js

// 测试肢体攻击伤害的计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*limbAttackDamage.module.js][limbAttackDamage.module.js:1]]
testObjects.push(
    {form:"LimbAttackDamage.calculate(limbAttackDamageProperties)",shouldbe:0,jsfile:"limbAttackDamage.module.js",document:"测试＂calculate＂计算肢体攻击伤害"}
)

import * as LimbAttackDamage from "./limbAttackDamage.module.js"

let  limbAttackDamageProperties={
    出战魂:0,
    巨化猎术:0,
    强弓劲弩:0
}
// limbAttackDamage.module.js:1 ends here
// meatQualityCoefficient.module.js

// 测试肉质系数的计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*meatQualityCoefficient.module.js][meatQualityCoefficient.module.js:1]]
testObjects.push(
    {form:"MeatQualityCoefficient.calculate(meatQualityStar)",shouldbe:1.15,jsfile:"meatQualityCoefficient.module.js",document:"测试＂calculate＂计算肉质系数"}
)

import * as MeatQualityCoefficient from "./meatQualityCoefficient.module.js"

let  meatQualityStar=3
// meatQualityCoefficient.module.js:1 ends here
// skillRuneDamage.module.js

// 测试技能符文伤害的计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*skillRuneDamage.module.js][skillRuneDamage.module.js:1]]
testObjects.push(
    {form:"parseFloat(SkillRuneDamage.calculate(skillRuneDamageProperties).toFixed(4))",shouldbe:22.2885,jsfile:"skillRuneDamage.module.js",document:"测试＂calculate＂计算技能符文伤害"}
)

import * as SkillRuneDamage from "./skillRuneDamage.module.js"

let  skillRuneDamageProperties={
    基础比例:15,
    血石增幅:0.17,
    威力系数:0.27
}
// skillRuneDamage.module.js:1 ends here
// nonWeaknessAttackDamage.module.js

// 测试攻击伤害（非弱点）的计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*nonWeaknessAttackDamage.module.js][nonWeaknessAttackDamage.module.js:1]]
testObjects.push(
    {form:"parseFloat(NonWeaknessAttackDamage.calculate(nonWeaknessAttackDamageProperties).toFixed(2))",shouldbe:1.08,jsfile:"nonWeaknessAttackDamage.module.js",document:"测试＂calculate＂计算攻击伤害（非弱点）"}
)

import * as NonWeaknessAttackDamage from "./nonWeaknessAttackDamage.module.js"

let  nonWeaknessAttackDamageProperties={
    /* 攻击伤害 */
    出战魂攻击伤害加成:0.06,
    脉石:0,
    兽潮攻击伤害加成:0.08,
    专精:0.36,
    技能符文:0.2,
    特技增幅:0.18,

    /* 物种伤害加成 */
    对应物种猎术:0.15,
    羁绊出战物种伤害加成:0.05,
    出战魂物种伤害加成:0,
    兽潮物种伤害加成:0
}
// nonWeaknessAttackDamage.module.js:1 ends here
// weaknessAttackDamage.module.js

// 测试攻击伤害（弱点）的计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*weaknessAttackDamage.module.js][weaknessAttackDamage.module.js:1]]
testObjects.push(
    {form:"parseFloat(WeaknessAttackDamage.calculate(weaknessAttackDamageProperties).toFixed(2))",shouldbe:1.68,jsfile:"weaknessAttackDamage.module.js",document:"测试＂calculate＂计算攻击伤害（弱点）"}
)

import * as WeaknessAttackDamage from "./weaknessAttackDamage.module.js"

let  weaknessAttackDamageProperties={
    /* 攻击伤害 */
    出战魂攻击伤害加成:0.06,
    脉石:0,
    兽潮攻击伤害加成:0.08,
    专精:0.36,
    技能符文:0.2,
    特技增幅:0.18,

    /* 物种伤害加成 */
    对应物种猎术:0.15,
    羁绊出战物种伤害加成:0.05,
    出战魂物种伤害加成:0,
    兽潮物种伤害加成:0,

    /* 弱点伤害 */
    出战魂弱点伤害加成:0,
    基础弱点伤害:0.5,
    狩猎术:0.1,
    特技弱点伤害增幅:0,
    技能符文弱点伤害增幅:0
}
// weaknessAttackDamage.module.js:1 ends here
// attackDamage.module.js

// 测试攻击伤害计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*attackDamage.module.js][attackDamage.module.js:1]]
testObjects.push(
    {form:"parseFloat(AttackDamage.calculate('weakness',weaknessAttackDamageProperties,nonWeaknessAttackDamageProperties).toFixed(2))",shouldbe:1.68,jsfile:"attackDamage.module.js",document:"测试＂calculate＂计算攻击伤害"},
    {form:"parseFloat(AttackDamage.calculate('nonweakness',weaknessAttackDamageProperties,nonWeaknessAttackDamageProperties).toFixed(2))",shouldbe:1.08,jsfile:"attackDamage.module.js",document:"测试＂calculate＂计算攻击伤害"}
)

import * as AttackDamage from "./attackDamage.module.js"
// attackDamage.module.js:1 ends here
// damage.module.js

// 测试总伤害计算


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*damage.module.js][damage.module.js:1]]
testObjects.push(
    {form:"Math.round(Damage.avg(damageProperties))",shouldbe:146486+45235,jsfile:"damage.module.js",document:"测试avg函数"},
    {form:"Math.round(Damage.max(damageProperties))",shouldbe:206791+63856,jsfile:"damage.module.js",document:"测试max函数"}
)

import * as Damage from "./damage.module.js"

let damageProperties={
    暴击率:CritRate.calculate(critRateProperties),
    暴击伤害倍率:CritDamageRate.calculate(critDamageRateProperties),
    攻击伤害加成:NonWeaknessAttackDamage.calculate(nonWeaknessAttackDamageProperties),
    肢体攻击伤害:LimbAttackDamage.calculate(limbAttackDamageProperties),
    易伤系数:vulnerabilityCoefficient,
    传递系数:transferCoefficient,
    肉质系数:MeatQualityCoefficient.calculate(meatQualityStar),
    技能符文伤害:SkillRuneDamage.calculate(skillRuneDamageProperties),

    攻击力:AttackPower.calculate(attackProperties),
    无视护甲后巨兽受到的伤害:Penetration.calculate(penetrationProperties),

    元素攻击力:ElementalAttackPower.calculate(elementalAttackProperties),
    非魂技元素伤害加成:NonSpiritualElementDamageBonus.calculate(nonSpiritualElementDamageProperties),
    魂技元素伤害加成:spiritualElementDamageBonus,
    无视抗性后巨兽受到的伤害:Resistance.calculate(resistanceProperties),
    星级系数加成:ElementalStarDamageFactor.calculate(elementalStar)
}
// damage.module.js:1 ends here
// EXPORT


// [[file:~/literate-programming/soul-hunter-awakening-damage-calculator-web-edition.org::*EXPORT][EXPORT:1]]
export{report}
// EXPORT:1 ends here
